<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>LiftSimu: /Users/alrik/Documents/workspace/LiftSimu/src/Trigger.java Quellcode</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="up.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiftSimu
   
   </div>
   <div id="projectbrief">die Simulation einer Liftanlage</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Erzeugt von Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Suchen');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Hauptseite</span></a></li>
      <li><a href="annotated.html"><span>Klassen</span></a></li>
      <li class="current"><a href="files.html"><span>Dateien</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Suchen" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Auflistung&#160;der&#160;Dateien</span></a></li>
    </ul>
  </div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Alle</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Klassen</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Dateien</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funktionen</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variablen</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">/Users/alrik/Documents/workspace/LiftSimu/src/Trigger.java</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_trigger_8java.html">gehe zur Dokumentation dieser Datei</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="keyword">import</span> java.awt.EventQueue;
<a name="l00002"></a>00002 
<a name="l00022"></a><a class="code" href="class_trigger.html">00022</a> <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_trigger.html" title="Der Trigger für die EventQueue.">Trigger</a> <span class="keyword">extends</span> Thread{
<a name="l00023"></a>00023    <span class="comment">//Milliseconds</span>
<a name="l00024"></a><a class="code" href="class_trigger.html#ab1e7f7075b57d5fe6954434c938cff28">00024</a>    <span class="keyword">private</span> <span class="keyword">final</span> <span class="keyword">static</span> <span class="keywordtype">long</span> <a class="code" href="class_trigger.html#ab1e7f7075b57d5fe6954434c938cff28">UPDATE_INTETRVAL</a> = 10;
<a name="l00025"></a><a class="code" href="class_trigger.html#aa1adcc4e30142b3de58948a5e5678006">00025</a>    <span class="keyword">private</span> <a class="code" href="class_update_request.html" title="bereitet einen neune Thread für GUI-Update vor">UpdateRequest</a> <a class="code" href="class_trigger.html#aa1adcc4e30142b3de58948a5e5678006">updateReq</a>; <span class="comment">// update Request</span>
<a name="l00026"></a>00026    
<a name="l00027"></a><a class="code" href="class_trigger.html#abc492427426c5c3029d5396cb87c21df">00027</a>    <a class="code" href="class_trigger.html#abc492427426c5c3029d5396cb87c21df">Trigger</a>(<a class="code" href="class_lift.html" title="die Klasse der Liftsteuerung">Lift</a> lift, <a class="code" href="class_simu_frame.html" title="Das Hauptfenster, mit der Simulation.">SimuFrame</a> viewHouse){
<a name="l00028"></a>00028       <a class="code" href="class_trigger.html#aa1adcc4e30142b3de58948a5e5678006">updateReq</a> = <span class="keyword">new</span> <a class="code" href="class_update_request.html" title="bereitet einen neune Thread für GUI-Update vor">UpdateRequest</a>( lift,  viewHouse);
<a name="l00029"></a>00029    }
<a name="l00030"></a>00030    
<a name="l00031"></a><a class="code" href="class_trigger.html#ac20ef660071450f4326efb8ce846646e">00031</a>    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_trigger.html#ac20ef660071450f4326efb8ce846646e">run</a>(){
<a name="l00032"></a>00032       <span class="keywordflow">try</span>{
<a name="l00033"></a>00033          <span class="keywordflow">while</span>(!isInterrupted()){
<a name="l00034"></a>00034             EventQueue.invokeLater(<a class="code" href="class_trigger.html#aa1adcc4e30142b3de58948a5e5678006">updateReq</a>);
<a name="l00035"></a>00035             Thread.sleep(<a class="code" href="class_trigger.html#ab1e7f7075b57d5fe6954434c938cff28">UPDATE_INTETRVAL</a>); 
<a name="l00036"></a>00036          }
<a name="l00037"></a>00037       }<span class="keywordflow">catch</span>( InterruptedException e){
<a name="l00038"></a>00038          System.out.println(<span class="stringliteral">&quot;LiftSimu unterbrochen\n&quot;</span>);
<a name="l00039"></a>00039       }
<a name="l00040"></a>00040    }
<a name="l00041"></a>00041 }
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Erzeugt am Fre Jul 6 2012 16:05:56 für LiftSimu von &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
